invalidate the line containing start, even if the [start,end) range is
authorHavoc Pennington <hp@pobox.com>
Sat, 23 Mar 2002 22:14:40 +0000 (22:14 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Sat, 23 Mar 2002 22:14:40 +0000 (22:14 +0000)
2002-03-23  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
invalidate the line containing start, even if the [start,end)
range is empty (just invalidate [start,end], essentially).
Partially fixes #72374

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextlayout.c

index 9dfbeffa6fedecc2411ebeaa839d3c75bab072bf..661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-23  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
+       invalidate the line containing start, even if the [start,end)
+       range is empty (just invalidate [start,end], essentially).
+       Partially fixes #72374
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
index 9dfbeffa6fedecc2411ebeaa839d3c75bab072bf..661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-23  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
+       invalidate the line containing start, even if the [start,end)
+       range is empty (just invalidate [start,end], essentially).
+       Partially fixes #72374
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
index 9dfbeffa6fedecc2411ebeaa839d3c75bab072bf..661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-23  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
+       invalidate the line containing start, even if the [start,end)
+       range is empty (just invalidate [start,end], essentially).
+       Partially fixes #72374
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
index 9dfbeffa6fedecc2411ebeaa839d3c75bab072bf..661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-23  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
+       invalidate the line containing start, even if the [start,end)
+       range is empty (just invalidate [start,end], essentially).
+       Partially fixes #72374
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
index 9dfbeffa6fedecc2411ebeaa839d3c75bab072bf..661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-23  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
+       invalidate the line containing start, even if the [start,end)
+       range is empty (just invalidate [start,end], essentially).
+       Partially fixes #72374
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
index 9dfbeffa6fedecc2411ebeaa839d3c75bab072bf..661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-23  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
+       invalidate the line containing start, even if the [start,end)
+       range is empty (just invalidate [start,end], essentially).
+       Partially fixes #72374
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
index b92e85cc8f16abdd9cd88ccb7e09bdf7be8706fd..71b585ac87f539d523876a64838a78186917ef85 100644 (file)
@@ -700,6 +700,13 @@ gtk_text_layout_real_invalidate (GtkTextLayout *layout,
   g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout));
   g_return_if_fail (layout->wrap_loop_count == 0);
 
+  /* Because we may be invalidating a mark, it's entirely possible
+   * that gtk_text_iter_equal (start, end) in which case we
+   * should still invalidate the line they are both on. i.e.
+   * we always invalidate the line with "start" even
+   * if there's an empty range.
+   */
+  
 #if 0
   gtk_text_view_index_spew (start_index, "invalidate start");
   gtk_text_view_index_spew (end_index, "invalidate end");
@@ -712,8 +719,7 @@ gtk_text_layout_real_invalidate (GtkTextLayout *layout,
     {
       GtkTextLineData *line_data = _gtk_text_line_get_data (line, layout);
 
-      if (line_data &&
-          (line != last_line || !gtk_text_iter_starts_line (end)))
+      if (line_data)
         {
           gtk_text_layout_invalidate_cache (layout, line);
           _gtk_text_line_invalidate_wrap (line, line_data);